home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "TextOut1.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
-
- const int FMax = 16;
- TColor Farbe[FMax] =
- {clBlack, clMaroon, clGreen, clNavy, clTeal, clPurple,
- clOlive, clGray, clSilver, clRed, clLime, clBlue,
- clAqua, clFuchsia, clYellow, clWhite};
-
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- for (int i=0; i<100; i++)
- {
- Canvas->Font->Color = Farbe[random(FMax)];
- Canvas->Font->Height = random(50)+10;
- Canvas->TextOut (random (ClientWidth),random (ClientHeight), "Hallo");
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- randomize ();
- }
- //---------------------------------------------------------------------------